# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer:
pkgname=fflas-ffpack
pkgver=2.5.0
pkgrel=3
pkgdesc="Library for basic linear algebra operations over a finite field"
url="https://github.com/linbox-team/fflas-ffpack"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	gmp-dev
	libgivaro-dev
	openblas-dev
	"
source="https://github.com/linbox-team/fflas-ffpack/releases/download/v$pkgver/fflas_ffpack-$pkgver.tar.bz2"
builddir="$srcdir/fflas_ffpack-$pkgver"

build() {
	export CXXFLAGS="${CXXFLAGS/-Os/-O3}" # gotta go fast
	./configure \
		--target="$CTARGET" \
		--build="$CBUILD" \
		--host="$CHOST" \
		--prefix=/usr \
		--without-archnative \
		--enable-openmp
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	mv "$pkgdir"/usr/bin/*fflas-ffpack-config "$pkgdir"/usr/bin/fflas-ffpack-config
}

sha512sums="
afe09cdb51a19b819377ed5e04910ef9d05704f0a4e85feb618abe523e2baf5be6f310ad33f006ef306b37892238ce993eff1326f3bec2fa7a7e32535e1fb90a  fflas_ffpack-2.5.0.tar.bz2
"
